-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Addition of PLLSAI on STM32F4/F7 and enabling of LTDC/DSI on STM32F769I-disco board #95200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addition of PLLSAI on STM32F4/F7 and enabling of LTDC/DSI on STM32F769I-disco board #95200
Conversation
7fdc488
to
edf7300
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments otherwise very good job. I agree with keeping the same name as in the RefMan to avoid confusion.
I just think we could use a single compatible since they are functionally a copy-paste apart from the descriptions.
Indeed, a single compatible would work as well and limit the code as well for the parsing then. |
|
60f23a2
to
b444622
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The board/shield part looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 blocking comment.
Add description of the PLLSAI of the stm32fx Signed-off-by: Alain Volmat <[email protected]>
Add code handling the pllsai. It is similar to the pllsai1 pllsai2 which can be found on some other socs, except, depending on the socs the fact that pllsai source can be or not common with other plls and moreover it can also have additional DIV_DIVQ and DIV_DIVR additional dividers. Choice is made to add PLLSAI instead of add further support to PLLSAI1, in order to stick to the proper naming of the PLLs. Signed-off-by: Alain Volmat <[email protected]>
Replace bitwise AND (&) by logical AND (&&) within preprocessor if statements in clock_stm32_ll_common.c Signed-off-by: Alain Volmat <[email protected]>
Add description of the pllsai PLL found on the stm32f7 series. Signed-off-by: Alain Volmat <[email protected]>
Not all STM32F4 embeds a PLLSAI hence this is added in stm32f427.dtsi and stm32f446.dtsi. Signed-off-by: Alain Volmat <[email protected]>
Add the pllsai configuration for boards that enables the LTDC and are relying on the LTDC driver to perform the PLLSAI configuration. This will allow to remove the PLLSAI code from the LTDC driver. Impacted boards are: boards/st/stm32f429i_disc1/stm32f429i_disc1.dts boards/st/stm32f746g_disco/stm32f746g_disco.dts boards/st/stm32f7508_dk/stm32f7508_dk.dts Signed-off-by: Alain Volmat <[email protected]>
Now that PLLSAI can be configured via the device-tree, remove the SOC specific PLLSAI configuration from the LTDC driver. Signed-off-by: Alain Volmat <[email protected]>
Describe the DSI block available from STM32F767 and onward and allow to output data generated by the LTDC to a DSI panel. Signed-off-by: Alain Volmat <[email protected]>
Add the description of the DSI connector available on the stm32f769i_disco board and zephyr_mipi_dsi/zephyr_lcd_controller alias to be used by display shields. Signed-off-by: Alain Volmat <[email protected]>
Add overlay and conf file dedicated for the stm32f769i_disco. Signed-off-by: Alain Volmat <[email protected]>
Add stm32f769i_disco conf file in order to increase the amount of HEAP to ensure k_malloc allocation goes well. Signed-off-by: Alain Volmat <[email protected]>
8876493
c2b1e39
to
8876493
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, forgot about this earlier, needs an entry in
extra_args: |
Addition of tests with the st_b_lcd40_dsi1_mb1166 shield. Signed-off-by: Alain Volmat <[email protected]>
|
Awesome! That's great! I was planning to continue with #74646, but it looks like I won't have to. Thank you so much. |
This PR add the PLLSAI support for the STM32F4 and F7 series. It is quite similar to the PLLSAI1 and PLLSAI2 added recently for the L4 series except the naming of the PLL (which is not PLLSAI1 but PLLSAI) and moreover has, depending on the soc, additional outputs and variants regarding the availability of the M divider, P / Q / R outputs as well as extra divider after Q and R outputs.
I have been wondering if it was better to introduce a new PLLSAI instead of relying on the PLLSAI1 and chose to add PLLSAI. This is a point of discussion I think. PLLSAI is the real name found in documentation on F series, there is no mention of PLLSAI1.
It slightly differ in the sense that on those series, there is no dedicated enable bit per PLLSAI output. That said, in the parsing of the DT I still kept the _ENABLED macro, indicated basically which has been found within the DT hence, which should be set, it could be renamed as _SET or so maybe.
The PLLSAI HAL functions for enabling / disabling the whole PLL have also different names, with obviously no 1 or 2 suffix in the name.
One goal of this PR was also to get rid of the PLLSAI code part of the LTDC driver. I removed that and added corresponding device-tree entry for those boards. I would be interested if someone could give it a try on those boards since I do not have them at hand so couldn't test for non-regression.
At last, STM32F769i-disco support is added. This one has a DSI output and rely on the st_b_lcd shield. I have a A-03 version of it and could test it properly, using various test app, display, lvgl or lvgl demo.
I noticed that part of the stm32f769i_disco.dts file, there is a touch panel defined, which I'd suspect is the one from the panel, however this doesn't have the same address as the one really available on the shield (at least the one I have) and the one described on the shield overlay. I'm pretty sure this should be removed since it isn't available on-board so shouldn't be described on the dts file but I'd be happy to understand to what it was suppose to refer to. At least on the board / shield I have, the address described in the shield, aka 0x38 is the right one ... not 0x2a.